package com.hk.web.domain.lifeCycle.repository;

import com.hk.commons.enums.Whether;
import com.hk.web.domain.entity.MerchantUserAccount;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 *
 * @author Antinomy
 * @date 17/11/1
 */
@Repository
public interface MerchantUserAccountRepository extends JpaRepository<MerchantUserAccount, Long> {

    /**
     * @param merchantKey
     * @param mobile
     * @return
     */
    MerchantUserAccount findByMerchantKeyAndMobile(String merchantKey,String mobile);

    /**
     * @param merchantKey
     * @param accountId
     * @param enable
     * @return
     */
    MerchantUserAccount findByMerchantKeyAndMerchantAccountIdAndEnable(String merchantKey,String accountId, Whether enable);
}
